package com.changcheng.project.yuminsi.enums;

/**
 * @author yuminsi
 * @description
 * @date 2020/8/21 10:13
 * @since
 */
public enum PlateColor {
    /**
     * 蓝
     */
    BLUE("蓝","0",""),
    /**
     * 黄
     */
    YELLOW("黄","1",""),
    /**
     * 黑
     */
    BLACK("黑","2",""),
    /**
     * 白
     */
    WHITE("白","3",""),
    /**
     * 渐变绿
     */
    GRADIENTGREEN("渐变绿","4","新能源一型客车"),
    /**
     * 黄绿双拼
     */
    YELLOWANDGREEN("黄绿双拼","5","新能源大客车"),
    /**
     * 蓝白渐变
     */
    BLUEANDWHITEGRADIENT("蓝白渐变","6",""),
    /**
     * 临时牌照
     */
    TEMPORARYLICENSE("临时牌照","7",""),
    /**
     * 绿色
     */
    GREEN("绿色","11",""),
    /**
     * 红色
     */
    RED("红色","12","");


    private String name;
    private String code;
    private String remark;

    PlateColor() {
    }

    PlateColor(String name, String code, String remark) {
        this.name = name;
        this.code = code;
        this.remark = remark;
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }

    public String getRemark() {
        return remark;
    }

    public static PlateColor getPlateColor(String code){
        for (PlateColor plateColor : values()){
            if (plateColor.getCode().equals(code)){
                return plateColor;
            }
        }
        return null;
    }
}
